package com.sdleyou.treepro.common.model.convert;

import com.sdleyou.treepro.common.model.dao.MapDO;
import com.sdleyou.treepro.common.model.enums.MapShowEnum;
import com.sdleyou.treepro.common.model.enums.MapStatusEnum;
import com.sdleyou.treepro.common.model.utils.RandomUtil;
import com.sdleyou.treepro.common.model.vo.MapVO;

public class MapVO2MapDOConverter {
    public static MapDO convert(MapVO mapVO) {
        MapDO mapDO = new MapDO();
        mapDO.setBaseId(RandomUtil.randomId());
        mapDO.setBaseName(mapVO.getName());
        mapDO.setBaseIcon(mapVO.getIcon());
        mapDO.setBaseImage(mapVO.getImage());
        mapDO.setStatus(MapStatusEnum.CLOSED.name());
        mapDO.setIsShow(MapShowEnum.HIDDEN.name());
        return mapDO;
    }
}
